home *** CD-ROM | disk | FTP | other *** search
/ Apple Macintosh CD: Power Macintosh 5200/75 / Apple Macintosh CD - Power Macintosh 5200_75.7z / Apple Macintosh CD - Power Macintosh 5200_75.bin / Extras / PowerTalk Extras / PowerTalk Mail Gateways / STF PowerFax™ PE Gateway / PowerFax™ PE Installer / STFApplications.sit / ARA Scripts / ETech UFOMATE (LnMgr) < prev    next >
Text File  |  1994-07-11  |  4KB  |  217 lines

  1. ! "E-Tech UFOMATE"
  2. ! This script has been verified to work with Line Manager.
  3. ! Uses normal mode and hardware flow control.
  4. !
  5. @ORIGINATE
  6. @ANSWER
  7. !
  8. @LABEL 1
  9. serreset 19200, 0, 8, 1
  10. !
  11. ! first recall the factory configuration
  12. !
  13. matchclr
  14. matchstr 1 4 "OK\13\10"
  15. write "AT&F\13"
  16. matchread 30
  17. jump 59
  18. !
  19. ! Next, Set up the configuration:
  20. !
  21. @LABEL 4
  22. pause 5
  23. matchstr 1 6 "OK\13\10"
  24. ! &L0 : Connect at highest speed lower than equal to the port speed
  25. ! $F4 : Enable CTS/RTS flow control
  26. ! $X0 : Enable normal connect message and DCE speed message
  27. ! $E0 : Normal mode
  28. ! $S0 : Enable speed conversion
  29. ! &D3 : Reset on DTR transition
  30. ! S0=0: Turn off auto-answer
  31. ! E0: Turn off echo
  32. write "AT&L0$F4$X0$E0$S0&D3S0=0E0 \13"
  33. matchread 30
  34. jump 59
  35. !
  36. ! If speaker on flag is true, jump to label 8. Else turn off speaker.
  37. @LABEL 6
  38. ifstr 2 8 "1"
  39. matchstr 1 8 "OK\13\10"
  40. write "ATM0\13"
  41. matchread 30
  42. jump 59
  43. !
  44. ! The modem is ready so enable answering, or originate a call
  45. !
  46. @LABEL 8
  47. pause 5
  48. ifANSWER 30
  49. note "Dialing ^1" 3
  50. write "ATDT^1\13"
  51. !
  52. @LABEL 9
  53. matchstr 1 11 "CONNECT 1200\13\10"
  54. matchstr 2 12 "CONNECT 2400\13\10"
  55. matchstr 3 13 "CONNECT 4800\13\10"
  56. matchstr 4 14 "CONNECT 7200\13\10"
  57. matchstr 5 15 "CONNECT 9600\13\10"
  58. matchstr 6 16 "CONNECT 12000\13\10"
  59. matchstr 7 17 "CONNECT 14400\13\10"
  60. matchstr 8 50 "NO CARRIER\13\10"
  61. matchstr 9 50 "ERROR\13\10"
  62. matchstr 10 52 "NO DIALTONE\13\10"
  63. matchstr 11 53 "BUSY\13\10"
  64. matchstr 12 54 "NO ANSWER\13\10"
  65. matchread 700
  66. jump 59
  67. !
  68. @LABEL 11
  69. note "Communicating at 1200 bps." 2
  70. setspeed 19200
  71. CommunicatingAt 1200
  72. jump 20
  73. !
  74. @LABEL 12
  75. note "Communicating at 2400 bps." 2
  76. setspeed 19200
  77. CommunicatingAt 2400
  78. jump 20
  79. !
  80. @LABEL 13
  81. note "Communicating at 4800 bps." 2
  82. setspeed 19200
  83. CommunicatingAt 4800
  84. jump 20
  85. !
  86. @LABEL 14
  87. note "Communicating at 7200 bps." 2
  88. setspeed 19200
  89. CommunicatingAt 7200
  90. jump 20
  91. !
  92. @LABEL 15
  93. note "Communicating at 9600 bps." 2
  94. setspeed 19200
  95. CommunicatingAt 9600
  96. jump 20
  97. !
  98. @LABEL 16
  99. note "Communicating at 12000 bps." 2
  100. setspeed 19200
  101. CommunicatingAt 12000
  102. jump 20
  103. !
  104. @LABEL 17
  105. note "Communicating at 14400 bps." 2
  106. setspeed 19200
  107. CommunicatingAt 14400
  108. jump 20
  109. !
  110. @LABEL 20
  111. HSRESET 0 1 0 0 0 0
  112. ifANSWER 21
  113. pause 30
  114. @LABEL 21 
  115. exit 0
  116. !
  117. ! @ANSWER
  118. ! Set up the modem to answer
  119. @LABEL 30
  120. write "ATS0=1\13"
  121. matchstr 1 31 "OK\13\10"
  122. matchread 30
  123. jump 59
  124. !
  125. @LABEL 31
  126. matchstr 1  32 "RING\13\10"
  127. matchstr 2  11 "CONNECT 1200\13\10"
  128. matchstr 3  12 "CONNECT 2400\13\10"
  129. matchstr 4  13 "CONNECT 4800\13\10"
  130. matchstr 5     14 "CONNECT 7200\13\10"
  131. matchstr 6  15 "CONNECT 9600\13\10"
  132. matchstr 7     16 "CONNECT 12000\13\10"
  133. matchstr 8  17 "CONNECT 14400\13\10"
  134. matchstr 9  50 "NO CARRIER\13\10"
  135. matchstr 10    50 "ERROR\13\10"
  136. matchstr 11    52 "NO DIALTONE\13\10"
  137. matchstr 12    53 "BUSY\13\10"
  138. matchstr 13 54 "NO ANSWER\13\10"
  139. matchread 700
  140. jump 31
  141. !
  142. @LABEL 32
  143. userhook 1
  144. note "Answering phone…" 2
  145. jump 31
  146. !
  147. ! 50: error messages
  148. !
  149. @LABEL 50
  150. exit -6021
  151. !
  152. @LABEL 52
  153. exit -6020
  154. !
  155. @LABEL 53
  156. exit -6022
  157. !
  158. @LABEL 54
  159. exit -6023
  160. !
  161. @LABEL 59
  162. exit -6019
  163. !
  164. @LABEL 70
  165. setspeed 19200
  166. jump 71
  167. !
  168. ! Hang up the modem
  169. !
  170. @HANGUP
  171. @LABEL 60
  172. settries 0
  173. HSReset 0 0 0 0 0 0 
  174. @LABEL 61
  175. write "ATH\13"
  176. matchclr
  177. matchstr 1 62 "NO CARRIER\13\10"
  178. matchstr 2 62 "OK\13\10"
  179. matchstr 3 62 "ERROR\13\10"
  180. matchread 30
  181. inctries
  182. iftries 3 59
  183. iftries 2 70
  184. !
  185. @LABEL 71
  186. ! no response, try escape sequence
  187. pause 12
  188. write "+++"
  189. matchclr
  190. matchstr 1 61 "OK\13\10"
  191. matchread 18
  192. ! try dropping DTR
  193. DTRClear
  194. pause 15
  195. DTRSet
  196. pause 15
  197. jump 61
  198. !
  199. @LABEL 62
  200. ! recall the factory settings
  201. pause 15
  202. write "AT&F\13"
  203. matchclr
  204. matchstr 1 63 "OK\13\10"
  205. matchread 30
  206. !
  207. @LABEL 63
  208. pause 5
  209. matchstr 1 64 "OK\13\10"
  210. write "ATS0=0\13"
  211. matchread 20
  212. !
  213. @LABEL 64
  214. exit 0
  215.  
  216.